package com.xtx.air.dao.operator.impl;

import com.xtx.air.dao.operator.IOperatorDAO;
import com.xtx.air.dataobject.OperatorDO;
import com.xtx.dao.BaseDAOImpl;

import java.util.List;

/**
 * User: hanyi
 * Date: 12-2-6
 * Time: 下午8:34
 */
public class OperatorDAOImpl extends BaseDAOImpl implements IOperatorDAO {
    @Override
    public List<String> findOperatorRole(String operName) {
        return queryForList("SELECT-OPERATOR-ROLE",operName);
    }

    @Override
    public void addOperator(OperatorDO operator) {
        executeInsert("INSERT-OPERATOR",operator);
    }

    @Override
    public Integer getOperatorCountByName(String name) {
        return (Integer)queryForObject("SELECT-OPERATOR-COUNT-BY-NAME",name);
    }

    @Override
    public OperatorDO getOperatorByLogName(String operLogName) {
        return (OperatorDO)queryForObject("SELECT-OPERATOR-BY-NAME",operLogName);
    }
}
